<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
      <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta content="" name="description" />
    <meta content="webthemez" name="author" />
    <title>Bootstrap Admin Template</title>
	<!-- Bootstrap Styles-->
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
     <!-- FontAwesome Styles-->
    <link href="assets/css/font-awesome.css" rel="stylesheet" />
        <!-- Custom Styles-->
    <link href="assets/css/custom-styles.css" rel="stylesheet" />
     <!-- Google Fonts-->
   <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
</head>
<body>
<div id="page-wrapper">

    <div class="header">
        <h1 class="page-header">
            我要选题
        </h1>

    </div>

        
            <div id="page-inner"> 
               
            <div class="row">
                <div class="col-md-12">
                    <!-- Advanced Tables -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                             选题列表
                        </div>
                        <div class="panel-body">
                            <div class="table-responsive">
                                <div id="dataTables-example_wrapper" class="dataTables_wrapper form-inline" role="grid">
                                    <div class="row"><div class="col-sm-6"><div class="dataTables_length" id="dataTables-example_length">
                                        <label>指导老师
                                            <select name="teachers" id="teachers" aria-controls="dataTables-example" class="form-control input-sm">

                                            </select>



                                            部门
                                            <select name="departments" aria-controls="dataTables-example" class="form-control input-sm">
                                                <option value="10">部门1</option>
                                                <option value="25">部门2</option>
                                                <option value="50">部门3</option>
                                                <option value="100">部门4</option>
                                            </select> 
                                        </label>
                                    </div></div><div class="col-sm-6"><div id="dataTables-example_filter" class="dataTables_filter">

                                        <label>
                                            Search:<input type="search" class="form-control input-sm" aria-controls="dataTables-example">
                                        </label>
                                        </div></div></div><table class="table table-striped table-bordered table-hover dataTable no-footer" id="dataTables-example" aria-describedby="dataTables-example_info">



                                    <thead>
                                        <tr role="row">
                                        <th class="sorting_asc" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column ascending" style="width: 79.6667px;">课题名称</th>
                                        <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 121.667px;">导师名</th>
                                        <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 112.667px;">课题类别</th>
                                        <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending" style="width: 65.6667px;">已选人数</th>
                                        <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 43.6667px;">选题</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        
                                    <tr class="gradeA odd">
                                            <td class="sorting_1">Gecko</td>
                                            <td class=" ">Firefox 1.0</td>
                                            <td class=" ">Win 98+ / OSX.2+</td>
                                            <td class="center ">1.7</td>
                                            <td class="center "><a href="#" class="btn btn-success" 
                                            onclick="return showdialog()">选题</a></td>
                                        </tr><tr class="gradeA even">
                                            <td class="sorting_1">Gecko</td>
                                            <td class=" ">Firefox 1.5</td>
                                            <td class=" ">Win 98+ / OSX.2+</td>
                                            <td class="center ">1.8</td>
                                            <td class="center "><a href="#" class="btn btn-success">选题</a></td>
                                        </tr><tr class="gradeA odd">
                                            <td class="sorting_1">Gecko</td>
                                            <td class=" ">Firefox 2.0</td>
                                            <td class=" ">Win 98+ / OSX.2+</td>
                                            <td class="center ">1.8</td>
                                            <td class="center "><a href="#" class="btn btn-success">选题</a></td>
                                        </tr><tr class="gradeA even">
                                            <td class="sorting_1">Gecko</td>
                                            <td class=" ">Firefox 3.0</td>
                                            <td class=" ">Win 2k+ / OSX.3+</td>
                                            <td class="center ">1.9</td>
                                            <td class="center "><a href="#" class="btn btn-success">选题</a></td>
                                        </tr><tr class="gradeA odd">
                                            <td class="sorting_1">Gecko</td>
                                            <td class=" ">Camino 1.0</td>
                                            <td class=" ">OSX.2+</td>
                                            <td class="center ">1.8</td>
                                            <td class="center "><a href="#" class="btn btn-success">选题</a></td>
                                        </tr><tr class="gradeA even">
                                            <td class="sorting_1">Gecko</td>
                                            <td class=" ">Camino 1.5</td>
                                            <td class=" ">OSX.3+</td>
                                            <td class="center ">1.8</td>
                                            <td class="center "><a href="#" class="btn btn-success">选题</a></td>
                                        </tr><tr class="gradeA odd">
                                            <td class="sorting_1">Gecko</td>
                                            <td class=" ">Netscape 7.2</td>
                                            <td class=" ">Win 95+ / Mac OS 8.6-9.2</td>
                                            <td class="center ">1.7</td>
                                            <td class="center "><a href="#" class="btn btn-success">选题</a></td>
                                        </tr><tr class="gradeA even">
                                            <td class="sorting_1">Gecko</td>
                                            <td class=" ">Netscape Browser 8</td>
                                            <td class=" ">Win 98SE+</td>
                                            <td class="center ">1.7</td>
                                            <td class="center "><a href="#" class="btn btn-success">选题</a></td>
                                        </tr><tr class="gradeA odd">
                                            <td class="sorting_1">Gecko</td>
                                            <td class=" ">Netscape Navigator 9</td>
                                            <td class=" ">Win 98+ / OSX.2+</td>
                                            <td class="center ">1.8</td>
                                            <td class="center "><a href="#" class="btn btn-success">选题</a></td>
                                        </tr><tr class="gradeA even">
                                            <td class="sorting_1">Gecko</td>
                                            <td class=" ">Mozilla 1.0</td>
                                            <td class=" ">Win 95+ / OSX.1+</td>
                                            <td class="center ">1</td>
                                            <td class="center "><a href="#" class="btn btn-success">选题</a></td>
                                        </tr></tbody>
                                </table>
                                    <div class="row"><div class="col-sm-6">
                                        <div class="dataTables_info" id="dataTables-example_info" role="alert" aria-live="polite" aria-relevant="all">
                                            Showing 1 to 10 of 57 entries
                                        </div>
                                    </div>
                                        <div class="col-sm-6">
                                            <div class="dataTables_paginate paging_simple_numbers" id="dataTables-example_paginate">
                                                <ul class="pagination">
                                                    <li class="paginate_button previous disabled" aria-controls="dataTables-example" tabindex="0" id="dataTables-example_previous">
                                                        <a href="#">Previous</a>
                                                    </li>
                                                    <li class="paginate_button active" aria-controls="dataTables-example" tabindex="0">
                                                        <a href="#">1</a>
                                                    </li><li class="paginate_button " aria-controls="dataTables-example" tabindex="0">
                                                        <a href="#">2</a>
                                                    </li>
                                                    <li class="paginate_button " aria-controls="dataTables-example" tabindex="0">
                                                        <a href="#">3</a>
                                                    </li>
                                                    <li class="paginate_button " aria-controls="dataTables-example" tabindex="0">
                                                        <a href="#">4</a>
                                                    </li>
                                                    <li class="paginate_button " aria-controls="dataTables-example" tabindex="0">
                                                        <a href="#">5</a>
                                                    </li>
                                                    <li class="paginate_button " aria-controls="dataTables-example" tabindex="0">
                                                        <a href="#">6</a>
                                                    </li>
                                                    <li class="paginate_button next" aria-controls="dataTables-example" tabindex="0" id="dataTables-example_next">
                                                        <a href="#">Next</a>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                        </div>
                    </div>
                    <!--End Advanced Tables -->
                </div>
            </div>

        </div>
    </div>

    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
            <h4 class="modal-title" id="myModalLabel">选题详情</h4>
            </div>
    <div class="modal-body">
    <div class="form-group">
        <label for="txt_departmentname">指导老师</label>
            <input type="text" name="txt_departmentname" class="form-control" id="txt_departmentname" placeholder="部门名称">
    </div>
    <div class="form-group">
        <label for="txt_parentdepartment">老师电话</label>
        <input type="text" name="txt_parentdepartment" class="form-control" id="txt_parentdepartment" placeholder="上级部门">
    </div>
    <div class="form-group">
        <label for="txt_departmentlevel">已选人数</label>
        <input type="text" name="txt_departmentlevel" class="form-control" id="txt_departmentlevel" placeholder="部门级别">
    </div>
    <div class="form-group">
        <label for="txt_statu">课题类别</label>
        <input type="text" name="txt_statu" class="form-control" id="txt_statu" placeholder="状态">
    </div>
    <div class="form-group">
        <label for="txt_statu">课题描述</label>
        <input type="text" name="txt_statu" class="form-control" id="txt_statu" placeholder="状态">
    </div>
    <div class="form-group">
        <label for="txt_statu">选题要求</label>
        <input type="text" name="txt_statu" class="form-control" id="txt_statu" placeholder="状态">
    </div>
    <div class="form-group">
        <label for="txt_statu">课题来源</label>
        <input type="text" name="txt_statu" class="form-control" id="txt_statu" placeholder="状态">
    </div>
 </div>
 <div class="modal-footer">
  <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
  <button type="button" id="btn_submit" class="btn btn-primary" data-dismiss="modal"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>申请</button>
  <button type="button" id="btn_submit" class="btn btn-primary" data-dismiss="modal"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>撤销申请</button>
 </div>
 </div>
 </div>
 </div>
<script type="text/javascript">
function showdialog(){
       $('#myModal').modal();
     }
</script>
     <!-- /. WRAPPER  -->
    <!-- JS Scripts-->
    <!-- jQuery Js -->
<script src="assets/js/jquery-1.10.2.js"></script>
      <!-- Bootstrap Js -->
<script src="assets/js/bootstrap.min.js"></script>
    <!-- Metis Menu Js -->
<script src="assets/js/jquery.metisMenu.js"></script>
      <!-- Custom Js -->
<script src="assets/js/custom-scripts.js"></script>
    <!--ajax-->
<script src="assets/js/jQuery-2.1.4.min.js"></script>
<script src="assets/js/util.js"></script>
<script>
    var re=getResponse('/user/findTeacher');
    console.log(re);
    var tmp = '<option value="-1" selected="selected">请选择指导老师</option>';
    for (var i = 0; i < re.responseJSON.length; i++) {
        tmp += '<option value='+re.responseJSON[i].username+'>'
            + re.responseJSON[i].realname + '</option>';
    }
    document.getElementById("teachers").innerHTML = tmp;

</script>

</body>
</html>
